//package com.plian.system.service.pm.investmentupnotice.impl;
//
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.fasterxml.jackson.core.type.TypeReference;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.google.gson.GsonBuilder;
//import com.itextpdf.text.*;
//import com.itextpdf.text.pdf.BaseFont;
//import com.itextpdf.text.pdf.PdfPCell;
//import com.itextpdf.text.pdf.PdfPTable;
//import com.itextpdf.text.pdf.PdfWriter;
//import com.plian.Tools.*;
//import com.plian.Tools.pagedata.PageData;
//import com.plian.spring.SpringUtil;
//import com.plian.system.common.status.MyCustomCode;
//import com.plian.system.config.exception.MyRuntimeException;
//import com.plian.system.constant.sys.FormStatusConstant;
//import com.plian.system.constant.sys.FormTypeConstant;
//import com.plian.system.dao.sys.orgzation.OrgzationDao;
//import com.plian.system.dao.sys.user.UserDao;
//import com.plian.system.entity.pm.appraisalreport.AppraisalReport;
//import com.plian.system.entity.pm.investmentupnotice.InvestmentupNotice;
//import com.plian.system.entity.pm.ownershipstructure.OwnershipStructure;
//import com.plian.system.mapper.pm.investmentupnotice.InvestmentupNoticeMapper;
//import com.plian.system.model.CommonCode;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.ObjResult;
//import com.plian.system.model.R;
//import com.plian.system.model.page.Page;
//import com.plian.system.mybatis.base.BaseFlowService;
//import com.plian.system.mybatis.base.BaseServiceImpl;
//import com.plian.system.mybatis.support.Condition;
//import com.plian.system.service.pm.appraisalreport.IAppraisalReportService;
//import com.plian.system.service.pm.investmentupnotice.IInvestmentupNoticeService;
//import com.plian.system.service.pm.ownershipstructure.IOwnershipStructureService;
//import com.plian.system.service.sys.code.IFormCodeService;
//import com.plian.system.vo.pm.appraisalreport.AppraisalReportVO;
//import com.plian.system.vo.pm.investmentupnotice.InvestmentupNoticeVO;
//import com.plian.system.vo.pm.ownershipstructure.OwnershipStructureVO;
//import com.plian.system.wrapper.pm.appraisalreport.AppraisalReportWrapper;
//import com.plian.system.wrapper.pm.investmentupnotice.InvestmentupNoticeWrapper;
//import com.plian.system.wrapper.pm.ownershipstructure.OwnershipStructureWrapper;
//import lombok.AllArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.lang.exception.ExceptionUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.io.File;
//import java.io.FileOutputStream;
//import java.util.List;
//import java.util.*;
//
//import static com.plian.system.constant.sys.FormStatusConstant.UNREVIEWED;
//import static com.plian.system.constant.sys.FormTypeConstant.CQZC_INVESTMENTUP_NOTICE;
//
///**
// * 增资扩股进场交易公告审核主表 服务实现类
// *
// */
//@Slf4j
//@Service
//@AllArgsConstructor
//public class InvestmentupNoticeServiceImpl extends BaseServiceImpl<InvestmentupNoticeMapper, InvestmentupNotice> implements IInvestmentupNoticeService, BaseFlowService {
//
//    private IAppraisalReportService appraisalReportService;
//    private IOwnershipStructureService ownershipStructureService;
//    private IFormCodeService formCodeService;
//    private InvestmentupNoticeMapper investmentupNoticeMapper;
//    @Autowired
//    private OrgzationDao orgzationDao;
//
//    private InvestmentupNoticeWrapper investmentupNoticeWrapper;
//
//    private OwnershipStructureWrapper ownershipStructureWrapper;
//
//    private AppraisalReportWrapper appraisalReportWrapper;
//
//    @Override
//    public boolean saveOrUpdate(InvestmentupNotice investmentupNotice) {
//        if (!Optional.ofNullable(investmentupNotice.getId()).isPresent()) {
//            investmentupNotice.setCode(formCodeService.getCode(FormTypeConstant.CQZC_INVESTMENTUP_NOTICE));
//            investmentupNotice.setFormType(String.valueOf(FormTypeConstant.CQZC_INVESTMENTUP_NOTICE));
//            investmentupNotice.setVersion("1");
//        }
//        if (Optional.ofNullable(investmentupNotice.getStatus()).isPresent() && investmentupNotice.getStatus() != -1) {
//            if (investmentupNotice.getId() == null) {
//                investmentupNotice.setStatus(FormStatusConstant.UNREVIEWED);
//            }
//        }
//
//        return super.saveOrUpdate(investmentupNotice);
//    }
//
//    @Override
//    public boolean deleteLogic(List<Long> ids) {
//        for (Long id : ids) {
//            InvestmentupNotice investmentupNotice = getById(id);
//            if (investmentupNotice == null) {
//                return false;
//            } else if (investmentupNotice.getStatus() != null &&
//                    (investmentupNotice.getStatus() != FormStatusConstant.STASH && investmentupNotice.getStatus() != FormStatusConstant.UNREVIEWED)) {
//                return false;
//            }
//        }
//        return super.deleteLogic(ids);
//    }
//
//
//    @Override
//    public HashMap<String,Object> commit(String id) {
//        handleStatus(Long.valueOf(id), FormStatusConstant.FLOW);
//
//        //将需要提交的流程变量返回，用于工作流侧
//        return new HashMap<String,Object>();
//    }
//
//    @Override
//    public Boolean reject(String id, int formState, String comment) {
//        return handleStatus(Long.valueOf(id), formState);
//    }
//
//    @Override
//    public Boolean finish(String id){
//        return handleStatus(Long.valueOf(id), FormStatusConstant.FINISH);
//    }
//
//    @Override
//    public Boolean checkIsExisted(Long id, String code) {
//        if (Optional.ofNullable(code).isPresent()) {
//            InvestmentupNotice investmentupNotice = new InvestmentupNotice();
//            investmentupNotice.setCode(code);
//            if (Optional.ofNullable(getOne(Condition.getQueryWrapper(investmentupNotice))).isPresent()) {
//                if (id == null || !id.equals(getOne(Condition.getQueryWrapper(investmentupNotice)).getId())) {
//                    return false;
//                }
//            }
//        }
//        return true;
//    }
//
//    @Override
//    public ObjResult checkSubmit(InvestmentupNotice investmentupNotice) {
//
//        if (!checkIsExisted(investmentupNotice.getId(), investmentupNotice.getCode())) {
//            return new ObjResult(MyCustomCode.BILL_ALREADY_EXISTS2);
//        }
//
//        return null;
//    }
//
//    @Override
//    public R<InvestmentupNoticeVO> getDetailObj(InvestmentupNoticeVO investmentupNoticeVO) {
//        investmentupNoticeVO.setOwnershipStructureVO(ownershipStructureWrapper
//                .entityToVO(ownershipStructureService.list(new LambdaQueryWrapper<OwnershipStructure>()
//                        .eq(OwnershipStructure::getInvestmentupNoticeId, investmentupNoticeVO.getId()))));
//        investmentupNoticeVO.setAppraisalReportVO(appraisalReportWrapper
//                .entityToVO(appraisalReportService.list(new LambdaQueryWrapper<AppraisalReport>()
//                        .eq(AppraisalReport::getInvestmentupNoticeId, investmentupNoticeVO.getId()))));
//        return R.data(investmentupNoticeVO);
//    }
//
//    @Override
//    public InvestmentupNoticeVO setChild(InvestmentupNoticeVO investmentupNoticeVO) {
//        if (Optional.ofNullable(investmentupNoticeVO).isPresent()) {
//            investmentupNoticeVO.setAppraisalReportVO(appraisalReportWrapper.entityToVO(
//                    appraisalReportService.list(new LambdaQueryWrapper<AppraisalReport>()
//                            .eq(AppraisalReport::getInvestmentupNoticeId, investmentupNoticeVO.getId()))));
//            investmentupNoticeVO.setOwnershipStructureVO(ownershipStructureWrapper.entityToVO(
//                    ownershipStructureService.list(new LambdaQueryWrapper<OwnershipStructure>()
//                            .eq(OwnershipStructure::getInvestmentupNoticeId, investmentupNoticeVO.getId()))));
//        }
//        return investmentupNoticeVO;
//    }
//
//
//    @Override
//    public Boolean saveChild(InvestmentupNoticeVO investmentupNoticeVO) {
//        try {
//            List<OwnershipStructureVO> ownershipStructureVO = investmentupNoticeVO.getOwnershipStructureVO();
//            for (OwnershipStructureVO ownVo : ownershipStructureVO) {
//                if (Optional.ofNullable(ownVo.getIsDeleted()).isPresent() && ownVo.getIsDeleted().intValue() == 1) {
//                    ownershipStructureService.removeById(ownVo.getId());
//                } else {
//                    ownVo.setInvestmentupNoticeId(investmentupNoticeVO.getId().toString());
//                    ownershipStructureService.saveOrUpdate(ownVo);
//                }
//            }
//            List<AppraisalReportVO> appraisalReportVO = investmentupNoticeVO.getAppraisalReportVO();
//            for (AppraisalReportVO appVo : appraisalReportVO) {
//                if (Optional.ofNullable(appVo.getIsDeleted()).isPresent() && appVo.getIsDeleted().intValue() == 1) {
//                    appraisalReportService.removeById(appVo.getId());
//                } else {
//                    appVo.setInvestmentupNoticeId(investmentupNoticeVO.getId().toString());
//                    appraisalReportService.saveOrUpdate(appVo);
//                }
//            }
//        } catch (Exception e) {
//            log.error(ExceptionUtils.getFullStackTrace(e));
//            return false;
//        }
//        return true;
//    }
//
//    /**
//     * @param formIds
//     * @return
//     */
//    @Override
//    public List<PageData> findByIds(List<String> formIds) {
//        QueryWrapper<InvestmentupNotice> queryWrapper = new QueryWrapper<>();
//        queryWrapper.in("id", Func.toLongList(org.apache.commons.lang3.StringUtils.join(formIds, StringPool.COMMA)));
//        List<InvestmentupNotice> investmentupNotice = list(queryWrapper);
//        List<InvestmentupNoticeVO> investmentupNoticeVOS = investmentupNoticeWrapper.entityToVO(investmentupNotice);
//        List<PageData> pageDataList = new ArrayList<>();
//        UserDao userDao = SpringUtil.getBean(UserDao.class);
//        try {
//            if (CollectionUtil.isNotEmpty(investmentupNoticeVOS)) {
//                for (InvestmentupNoticeVO vo : investmentupNoticeVOS) {
//                    vo.setUNITNAME(vo.getReportCompanyName());
//                    vo.setAPPLICANTNAME(vo.getCreateUserName());
//                    if (StringUtil.isNotBlank(vo.getCreateUser())) {
//                        PageData pd = userDao.findbyid(vo.getCreateUser());
//                        if (pd != null) {
//                            vo.setAPPLICANTNAME(pd.getString("name"));
////                            investmentupNoticeVO.setCreateUserName();
//                        }
//                    }
//                    PageData pd = new PageData();
//                    ObjectMapper mapper = new ObjectMapper();
//                    String json = new GsonBuilder().setDateFormat(DateUtil.PATTERN_DATETIME).create().toJson(vo);
//                    pd.put("orgName",vo.getReportCompanyName());
//                    pd.putAll(mapper.readValue(json, new TypeReference<HashMap<String, String>>() {
//                    }));
//                    pageDataList.add(pd);
//                }
//            }
//            return pageDataList;
//        } catch (Exception e) {
//            log.error(ExceptionUtils.getFullStackTrace(e));
//        }
//        return pageDataList;
//    }
//
//    @Override
//    public List<Integer> getFormType() {
//        return Arrays.asList(CQZC_INVESTMENTUP_NOTICE);
//    }
//
//    @Override
//    public void goBackToStash(String formId) {
//        handleStatus(Long.valueOf(formId), UNREVIEWED);
//    }
//
//    @Override
//    public ListResult<PageData> reportList(PageData pd) {
//        Page page=new Page(false,pd);
//        try {
//            List<PageData> list= investmentupNoticeMapper.reportListPage(page);
//            ListResult listResult=new ListResult(CommonCode.SUCCESS);
//            listResult.setList(list);
//            listResult.setTotal(page.getTotal());
//            return listResult;
//        } catch (Exception e) {
//            log.error(ExceptionUtils.getFullStackTrace(e));
//            throw new MyRuntimeException();
//        }
//    }
//
//    /**
//     * 统一处理状态机事件方法
//     *
//     * @param id           主键
//     * @param updateStatus 判断状态
//     * @return boolean
//     */
//    private Boolean handleStatus(Long id, int updateStatus) {
//        try {
//            InvestmentupNotice investmentupNotice = getById(id);
//            investmentupNotice.setStatus(updateStatus);
//            updateById(investmentupNotice);
//            return true;
//        } catch (Exception e) {
//            log.error(ExceptionUtils.getFullStackTrace(e));
//            return false;
//        }
//    }
//    @Override
//    public File createReceptFile(Long id) throws Exception {
//        InvestmentupNotice investmentupNotice=getById(id);
//        Document document = new Document(com.itextpdf.text.PageSize.A4, 10, 10, 30, 40);
//        FileOutputStream fs;
//        BaseFont bfHeiTi;
//        BaseFont bfST;
//        BaseFont test;
//        BaseFont bfbt;
//        File pdffile = null;
//        pdffile = File.createTempFile(id.toString(), ".pdf");
//        if (pdffile.exists()) {
//            pdffile.delete();
//        }
//        fs = new FileOutputStream(pdffile.getPath());//getAbsolutePath
//        PdfWriter.getInstance(document, fs);
//        document.open();
//        bfST = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
//        bfHeiTi = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
//        bfbt = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
//        test = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
//        // 添加标题
//        Font font_Biaoti = new Font(bfHeiTi, 20.0f, Font.BOLD, BaseColor.BLACK);
//        Font font_biaotou1 = new Font(test, 12.0f, Font.NORMAL, BaseColor.BLACK);
//        Font font_biaotou2 = new Font(bfbt, 10.0f, Font.NORMAL, BaseColor.BLACK);
//        Font font_Zhengwen = new Font(bfST, 11.0f, Font.NORMAL, BaseColor.BLACK);
//        // 创建一个段落
//        String title = "增资扩股进场交易信息公告审核表";
//        Paragraph biaoti = new Paragraph(title, font_Biaoti);
//        biaoti.setAlignment(1);
//        biaoti.setSpacingAfter(20f);
//        document.add(biaoti);
//
//        PdfPTable table = new PdfPTable(2);// 建立一个pdf表格
//        table.setWidths(new int[]{1,1});
//        table.setSpacingBefore(10f);// 设置表格上面空白宽度
//        table.setSpacingAfter(0f);// 设置表格下面空白宽度
//        table.setSpacingBefore(10f);// 设置表格上面空白宽度
//        table.setSpacingAfter(0f);// 设置表格下面空白宽度
//        table.setTotalWidth(800);// 设置表格的宽度
//        table.setWidths(new int[]{1,2});
//
//        PdfPCell cell  = new PdfPCell(new Phrase("融资方", font_Zhengwen));
//        cell.setMinimumHeight(30);
//        // 由四列变成一列
//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table.addCell(cell);
//
//        PageData p=orgzationDao.findbyid(investmentupNotice.getFinanciersId());
//        String FinanciersName="";
//        if(p!=null){
//            FinanciersName=p.getString("name");
//        }
//        PdfPCell cell1  = new PdfPCell(new Phrase(FinanciersName, font_Zhengwen));
//        // 由四列变成一列
//        cell1.setColspan(2);
//        cell1.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell1.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table.addCell(cell1);
//
//        PdfPCell cell2  = new PdfPCell(new Phrase("融资额（万元）", font_Zhengwen));
//        cell2.setMinimumHeight(30);
//        // 由四列变成一列
//        cell2.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell2.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table.addCell(cell2);
//
//        PdfPCell cell3  = new PdfPCell(new Phrase(investmentupNotice.getFinanciersAmount().toPlainString(), font_Zhengwen));
//        // 由四列变成一列
//        cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table.addCell(cell3);
//
//        PdfPTable table1 = new PdfPTable(4);// 建立一个pdf表格
//        PdfPCell cell4  = new PdfPCell(new Phrase("增资前后股权结构", font_Zhengwen));
//        cell4.setColspan(4);
//        cell4.setMinimumHeight(30);
//        // 由四列变成一列
//        cell4.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell4.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table1.addCell(cell4);
//
//        String titles[]={
//            "股东名称",
//            "原出资额（万元）",
//            "原出资比例",
//            "增资后出资比例",
//        };
//        for (String s : titles) {
//            PdfPCell cell5  = new PdfPCell(new Phrase(s, font_Zhengwen));
//            cell5.setMinimumHeight(30);
//            // 由四列变成一列
//            cell5.setHorizontalAlignment(Element.ALIGN_CENTER);
//            cell5.setVerticalAlignment(Element.ALIGN_MIDDLE);
//            table1.addCell(cell5);
//        }
//       List<OwnershipStructureVO> l= ownershipStructureWrapper.entityToVO(ownershipStructureService
//                       .list(new LambdaQueryWrapper<OwnershipStructure>().eq(OwnershipStructure::getInvestmentupNoticeId, investmentupNotice.getId())));
//        for (OwnershipStructureVO ownershipStructure : l) {
//            PdfPCell cell5  = new PdfPCell(new Phrase(ownershipStructure.getShareholderName(), font_Zhengwen));
//            cell5.setMinimumHeight(30);
//            // 由四列变成一列
//            cell5.setHorizontalAlignment(Element.ALIGN_CENTER);
//            cell5.setVerticalAlignment(Element.ALIGN_MIDDLE);
//            table1.addCell(cell5);
//
//            PdfPCell cell6  = new PdfPCell(new Phrase(ownershipStructure.getContributionCapital().toPlainString(), font_Zhengwen));
//            // 由四列变成一列
//            cell6.setHorizontalAlignment(Element.ALIGN_CENTER);
//            cell6.setVerticalAlignment(Element.ALIGN_MIDDLE);
//            table1.addCell(cell6);
//
//            PdfPCell cell7  = new PdfPCell(new Phrase(ownershipStructure.getBeforeFundedRatio().toPlainString(), font_Zhengwen));
//            // 由四列变成一列
//            cell7.setHorizontalAlignment(Element.ALIGN_CENTER);
//            cell7.setVerticalAlignment(Element.ALIGN_MIDDLE);
//            table1.addCell(cell7);
//            PdfPCell cell8 = new PdfPCell(new Phrase(ownershipStructure.getAfterFundedRatio().toPlainString(), font_Zhengwen));
//            // 由四列变成一列
//            cell8.setHorizontalAlignment(Element.ALIGN_CENTER);
//            cell8.setVerticalAlignment(Element.ALIGN_MIDDLE);
//            table1.addCell(cell8);
//        }
//
//        PdfPTable table2 = new PdfPTable(3);// 建立一个pdf表格
//        PdfPCell cell5  = new PdfPCell(new Phrase("决策文件", font_Zhengwen));
//        cell5.setMinimumHeight(30);
//        // 由四列变成一列
//        cell5.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell5.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell5);
//
//        PdfPCell cell6  = new PdfPCell(new Phrase(investmentupNotice.getDecisionDoc(), font_Zhengwen));
//        cell6.setColspan(2);
//        // 由四列变成一列
//        cell6.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell6.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell6);
//
//
//
//        List<AppraisalReportVO> l1 = appraisalReportWrapper.entityToVO(appraisalReportService
//                .list(new LambdaQueryWrapper<AppraisalReport>().eq(AppraisalReport::getInvestmentupNoticeId, investmentupNotice.getId())));
//        PdfPCell cell7 = new PdfPCell(new Phrase("评估报告", font_Zhengwen));
//        cell7.setRowspan(l1.size()+1);
//        cell7.setMinimumHeight(30);
//        // 由四列变成一列
//        cell7.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell7.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell7);
//
//        PdfPCell cell8 = new PdfPCell(new Phrase("文    号", font_Zhengwen));
//        cell8.setMinimumHeight(30);
//        cell8.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell8.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell8);
//
//        PdfPCell cell9 = new PdfPCell(new Phrase("评 估 价", font_Zhengwen));
//        cell9.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell9.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell9);
//
//        for (AppraisalReport appraisalReport : l1) {
//            PdfPCell cell10 = new PdfPCell(new Phrase(appraisalReport.getEvaluationReportNum(), font_Zhengwen));
//            cell10.setMinimumHeight(30);
//            cell10.setHorizontalAlignment(Element.ALIGN_CENTER);
//            cell10.setVerticalAlignment(Element.ALIGN_MIDDLE);
//            table2.addCell(cell10);
//            PdfPCell cell11 = new PdfPCell(new Phrase(appraisalReport.getEvaluationPrice().toPlainString(), font_Zhengwen));
//            cell11.setHorizontalAlignment(Element.ALIGN_CENTER);
//            cell11.setVerticalAlignment(Element.ALIGN_MIDDLE);
//            table2.addCell(cell11);
//        }
//
//        PdfPCell cell10 = new PdfPCell(new Phrase("投资方资格条件", font_Zhengwen));
//        cell10.setMinimumHeight(100);
//        cell10.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell10.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell10);
//        PdfPCell cell11 = new PdfPCell(new Phrase(investmentupNotice.getInvestorQualification(), font_Zhengwen));
//        cell11.setColspan(2);
//        cell11.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell11.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell11);
//
//        PdfPCell cell12 = new PdfPCell(new Phrase("遴选方式 ", font_Zhengwen));
//        cell12.setMinimumHeight(30);
//        cell12.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell12.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell12);
//
//        PdfPCell cell13 = new PdfPCell(new Phrase(investmentupNotice.getSelectionMethod(), font_Zhengwen));
//        cell13.setColspan(2);
//        cell13.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell13.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell13);
//
//        PdfPCell cell14 = new PdfPCell(new Phrase("遴选方案主要条款 ", font_Zhengwen));
//        cell14.setMinimumHeight(30);
//        cell14.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell14.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell14);
//
//        PdfPCell cell15 = new PdfPCell(new Phrase(investmentupNotice.getSelectionMethodClause(), font_Zhengwen));
//        cell15.setColspan(2);
//        cell15.setHorizontalAlignment(Element.ALIGN_CENTER);
//        cell15.setVerticalAlignment(Element.ALIGN_MIDDLE);
//        table2.addCell(cell15);
//
//        PdfPCell cell17 = new PdfPCell(new Phrase("\n填报人： \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n                        " +"年            月             日", font_Zhengwen));
//        cell17.setHorizontalAlignment(Element.ALIGN_LEFT);
//        table2.addCell(cell17);
//
//        PdfPCell cell18 = new PdfPCell(new Phrase("\n审核意见： \n\n\n\n\n\n\n\n\n\n\n\n                                                    审核人：\n\n\n                              " +
//                "                                                              年            月             日", font_Zhengwen));
//        cell18.setColspan(2);
//        cell18.setHorizontalAlignment(Element.ALIGN_LEFT);
//        table2.addCell(cell18);
//
//
//        document.add(table);
//        document.add(table1);
//        document.add(table2);
//        document.close();
//        return pdffile;
//    }
//}
